var LMMManager = function(canvas, system)
{
	this.stage = null;
	this.rooms = new Array();
	this.currentRoom = null;
	this.init(canvas, system);
}

LMMManager.prototype.init = function(canvas, system)
{
	this.canvas = canvas
	this.system = system;
	this.stage = new createjs.Stage(canvas);
	
	this.loadRooms();
}

LMMManager.prototype.gotoStage = function(index)
{
	if (this.currentRoom != null)
	{
		this.currentRoom.visible = false;
	}
	
	this.currentRoom = this.rooms[index];
	this.currentRoom.visible = true;
	this.stage.update();
}

LMMManager.prototype.loadRooms = function()
{
	this.loadMainMenu();
}

LMMManager.prototype.loadMainMenu = function()
{
	var container = new createjs.Container();
	this.stage.addChild(container);
	container.visible = false;
	
	var background = new createjs.Shape();
	background.graphics.beginFill("rgb(33,10,10)").drawRect(0,0,this.canvas.width, this.canvas.height);
	container.addChild(background);
	
	var startButton = new Button("Start", "rgb(0,130,0)", "#FFF");
	startButton.x = 30;
	startButton.y = 30;
	container.addChild(startButton);
	
	this.stage.update();
	
	this.rooms.push(container);
}